package com.buer.storage.business.dao;


import com.buer.storage.business.domain.Dorder;
import com.buer.storage.business.domain.Dorderdetails;
import com.buer.storage.business.domain.Stock;
import com.buer.storage.business.dto.DorderDto;
import com.buer.storage.business.dto.DorderdetailsDto;
import com.buer.storage.business.dto.OutStorageAllDto;
import com.buer.storage.business.dto.OutStorageDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DorderDao {
    //查询所有库存
    List<Stock> findStock();
    List<Dorder> selectByAll(String dorderNum, Integer dtypeId, String prodName, String beginTime, String endTime);


    //订单
    int insertOrder(OutStorageDto outStorageDto);

    //商品
    int insertDetails(@Param(value = "arrary") Dorderdetails[] outProds);

    //查询订单表
    List<DorderDto> findOrderAll();
    //查询入库表
    List<OutStorageAllDto> findOutAll(Integer outId);

    //List<DorderdetailsDto> queryOrderDetailInfoByOutId(Integer outId);

    //根据订单id删除商品信息
    int deleteOutStorageById(int outId);

    //根据商品表id删除商品信息
    int deleteDorderdetails(int deliveryId);

    void deleteDorderByOutId(Integer outId);
    void deleteDorderDetailsByOutId(Integer outId);

    Stock queryBuerStockByParam(DorderdetailsDto putProd);

    int updateAddSumStock(Stock stock);

    //void insertStock2(Dorderdetails putProd);
    //查询入库表

    DorderdetailsDto[] findOrderDetailInfoByOutId(Integer outId);

    DorderdetailsDto[] findDordertailsAll(Integer outId);

    void insertStock(DorderdetailsDto outProd);

    int deleteStock(int stock_id);

    int updateStatus(int outId);
}
